{template header}
 
<div class="outWrap">
	<div class="leftMenu">
		<ul>
			<li id="left_menu_priv_info" class="on">
			<h3><a href="{url user/space/$member['uid']}">个人设置</a></h3>
			</li>
			<li>
			<h3><a href="{SITE_URL}">返回首页</a></h3>
			</li>
		</ul>
	</div>
	<div class="rightCont">
		<div class="userInfo">
			<h5>{$member['username']}的基本资料</h5>
			<table cellspacing="0" cellpadding="0" width="600" class="dataTb01">
				<tr>
					<th>用户名</th>
					<td>{$member['username']}</td>
					<th>性别</th>
					<td>{if 1 == $member['gender']}男{elseif 0 == $member['gender']}女{else}保密{/if}</td>
				</tr>
				<tr>
					<th>会员组</th>
					<td>{$membergroup['grouptitle']}</td>
					<th>升级进度</th>
					<td>
					<!--{if 2==$membergroup['grouptype']}-->
						<div class="rankBar"><img height="11" width="{$credit1percent}%" alt="{$credit1percent}%" src="{SITE_URL}css/default/rank_bar.gif"></div>
						<span>($member['credit1']/$membergroup['creditshigher'])</span>
					<!--{/if}-->
					</td>
				</tr>
				<tr>
					<th>回答数</th>
					<td>{$member['answers']}</td>
					<th>提问数</th>
					<td>{$member['questions']}</td>
				</tr>
				<tr>
					<th>采纳率</th>
					<td>$adoptpercent% </td>
					<th>最后登录</th>
					<td>{$member['lastlogin']}</td>
				</tr>
				<tr>
					<th>个性签名</th>
					<td style="text-align: left;" colspan="3">{$member['signature']} </td>
				</tr>
				<tr>
					<th>联系TA</th>
					<td><a  href="javascript:void(0)"  onclick="javascript:sendmsg('{$member['username']}');" ><img border="0" src="{SITE_URL}css/default/pm.gif">发送消息</a></td>
					<td  colspan="2"><a href="{url question/add/$member['uid']}"><img border="0" src="{SITE_URL}css/default/poke.gif">向他提问</a></td>
				</tr>
 

			</table>
 
			<div class="tags">
				<ul>
					<!--{if 1==$type}-->
						<li class="on"><h3>TA的提问</h3></li><li class><a href="{url user/space/$member['uid']/2}"><h3>TA的回答</h3></a></li>
					<!--{else}-->
						<li class><a href="{url user/space/$member['uid']/1}"><h3>TA的提问</h3></a></li><li class="on"><h3>TA的回答</h3></li>
					<!--{/if}-->
				</ul>
			</div>
			<div class="listCont">
					<!--{if 1==$type}-->
							<table cellspacing="0" cellpadding="0" width="96%">
									<tr>
										<th>标题</th>
										<th>状态</th>
										<th>悬赏分</th>
										<th>回答数</th>
										<th>提问时间</th>
									</tr>
								<!--{loop $questionlist $index  $question}-->
									<!--{if $index%2}-->
									<tr class>
									<!--{else}-->
									<tr class="bg">
									<!--{/if}-->
										<td class="qstTitle"><small><a target="_blank" href="{url category/view/$question['cid']}">[{$question['category_name']}]</a></small>
										<a target="_blank" href="{$question['url']}">{$question['title']}</a></td>
										<td><img src="{SITE_URL}css/default/icn_{$question['status']}.gif"></td>
										<td>{$question['price']}</td>
										<td class="num">{$question['answers']}</td>
										<td class="num">{$question['format_time']}</td>
									</tr>
								<!--{/loop}-->
							</table>
					<!--{else}-->
							<table cellspacing="0" cellpadding="0" width="96%">
								<tr>
									<th>标题</th>
									<th>被采纳答案</th>
									<th>回答时间</th>
								</tr>
								<!--{loop $questionlist $index  $answer}-->
									<!--{if $index%2}-->
									<tr class>
									<!--{else}-->
									<tr class="bg">
									<!--{/if}-->
									<td class="qstTitle"><a target="_blank" href="{url question/view/$answer['qid']}">{$answer['title']}</a></td>
									<td>{if $answer['adopttime']}<img src="{SITE_URL}css/default/icn_best.gif">{/if}</td>
									<td class="num">{$answer['time']}</td>
								</tr>
								<!--{/loop}-->
							</table>
					<!--{/if}-->
					<div class="pages">{$departstr}</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
function sendmsg(username){
	var code_message='';
	if(1=={$setting['code_message']}){
		code_message='<li>验证码：<input type="text" size="10"  maxlength="4" id="code" name="code" onblur="check_code()" /><img id="verifycode" onclick="javascript:updatecode();" src="index.php?c=user&a=code"/>&nbsp;<span id="codetip"><a href="javascript:updatecode();">看不清，换一个</a></span></li>';
	}
	$.dialog({
	    id:'sendmsgDiv',
	    position:'center',
	    align:'left',
	    fixed:1,
	    width:400,
	    title:'发送消息',
	    fnOk:function(){document.sendmsgForm.submit();$.dialog.close('sendmsgDiv')},
	    fnCancel:function(){$.dialog.close('sendmsgDiv')},
	    content:'<div class="formItem"><form name="sendmsgForm"  action="index.php?c=message&a=send" method="post"><ul><li>接收人：'+username+'</li><li>标题：<input type="text" size="42"  maxlength="18" class="txt" id="title" name="title"></li><li>内容：<textarea name="content" style="width: 95%;" rows="8" ></textarea></li>'+code_message+'<li class="btns"><input type="hidden" name="username" value="'+username+'"></li></ul></form></div>'
	  });
}
</script>
{template footer}